package weekend02;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File file =new File("./demo.txt");
        String name = file.getName();
        System.out.println("文件的名称是:"+name);

        long lenth  = file.length();
        System.out.println("文件的长度是:"+lenth);

        boolean ih = file.isHidden();
        boolean cr = file.canRead();
        boolean cw = file.canWrite();
        System.out.println("文件是否隐藏:"+ih);
        System.out.println("文件是否可读:"+cr);
        System.out.println("文件是否可写:"+cw);



    }
}
